package com.monkeyboy.spring;

import com.monkeyboy.spring.config.AppConfig;
import com.monkeyboy.spring.service.A;
import com.monkeyboy.spring.service.B;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @Author Gavin
 * @date 2021.02.27 16:54
 */
@Component
public class Test  implements InitializingBean {
	@Resource
	M m;

	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("test 111111111111111111");
	}
	@PostConstruct
	public void post(){
		System.out.println("post Construct--------------");
	}
}
@Component
@DependsOn("test")
class M{
	public M(){
		System.out.println("m 被实例化了。。。。。。。。。。。。。。。。");
	}
}
